from typing import TypeVar, Iterable, Tuple, Type

T = TypeVar('T')

# STreeCtrl 常量
STVI_ROOT = 0xFFFF0000
STVI_FIRST = 0xFFFF0001
STVI_LAST = 0xFFFF0002	#=TVI_LAST
STVN_ROOT = 0xFFFF0000	#=STVN_ROOT
STVN_FIRST = 0xFFFF0001	#=STVN_FIRST
STVN_LAST = 0xFFFF0002	#=STVN_LAST
STVL_ROOT = 0xFFFF0000

TVE_COLLAPSE = 0x0001
TVE_EXPAND = 0x0002
TVE_TOGGLE = 0x0003

TVC_COLLAPSE = 0x0001
TVC_EXPAND = 0x0002
TVC_TOGGLE = 0x0003

RECONTENT_CARET = 4294967294 #内容插入在光标(2^32-1)
RECONTENT_LAST = 4294967295 #内容插入在结尾(2^32-2)

E_NOINTERFACE = 0x80004002

RES_PE = 0
RES_FILE = 1

class Event():
    EVT_INIT = 8000
    EVT_EXIT = 8001
    EVT_TIMER = 8002

    #基本窗口事件
    EVT_SETFOCUS = 8100
    EVT_KILLFOCUS = 8101
    EVT_CREATE = 8102
    EVT_INIT_FINISH = 8103
    EVT_DESTROY = 8104
    EVT_SIZE = 8105
    EVT_VISIBLECHANGED = 8106
    EVT_STATECHANGED = 8107
    EVT_LBUTTONDOWN = 8108
    EVT_LBUTTONUP = 8109
    EVT_UPDATE_TOOLTIP = 8110

    EVT_KEYDOWN = 8200

    #两个窗口鼠标状态事件
    EVT_MOUSE_HOVER = 9000
    EVT_MOUSE_LEAVE = 9001

    EVT_CMD = 10000
    EVT_CTXMENU = 10001

    #增加两个滚动VIEW的事件
    EVT_SCROLLVIEW_ORIGINCHANGED = 10002
    EVT_SCROLLVIEW_SIZECHANGED = 10003

    EVT_SCROLL = 10004
    EVT_OFEVENT = 10005    #消息二次包装
    EVT_OFPANEL = 10006    #一个itemPanel中的消息的二次包装

    #增加4个itempanel相关的事件,经过EVT_OFPANEL到达应用层
    EVT_ITEMPANEL_CLICK = 10007
    EVT_ITEMPANEL_RCLICK = 10008
    EVT_ITEMPANEL_CLICK_UP = 10009
    EVT_ITEMPANEL_RCLICK_UP = 10010
    EVT_ITEMPANEL_DBCLICK = 10011
    EVT_ITEMPANEL_HOVER = 10012
    EVT_ITEMPANEL_LEAVE = 10013

    EVT_RADIOGROUP_CHECK_CHANGED = 10100

    EVT_TAB_SELCHANGING = 11000
    EVT_TAB_SELCHANGED = 11001
    EVT_TAB_ITEMHOVER = 11002
    EVT_TAB_ITEMLEAVE = 11003

    EVT_LB_SELCHANGING = 12000
    EVT_LB_SELCHANGED = 12001
    EVT_LB_DBCLICK = 12002

    EVT_LC_SELCHANGING = 13000
    EVT_LC_SELCHANGED = 13001
    EVT_LC_ITEMDELETED = 13002
    EVT_LC_DBCLICK = 13003

    EVT_TV_SELCHANGING = 14000
    EVT_TV_SELCHANGED = 14001

    EVT_TC_SELCHANGING = 15000
    EVT_TC_SELCHANGED = 15001
    EVT_TC_EXPAND = 15002
    EVT_TC_CHECKSTATE = 15003
    EVT_TC_DBCLICK = 15004    #treectrl的叶子节点双击事件, add by zhaosheng

    EVT_LV_SELCHANGING = 15100
    EVT_LV_SELCHANGED = 15101
    EVT_LV_ITEMCLICK = 15102

    EVT_RE_NOTIFY = 16000
    EVT_RE_MENU = 16001

    EVT_SLIDER_POS = 17000

    EVT_HEADER_CLICK = 18000
    EVT_HEADER_ITEMCHANGING = 18001
    EVT_HEADER_ITEMCHANGED = 18002
    EVT_HEADER_ITEMSWAP = 18003
    EVT_HEADER_RELAYOUT = 18004

    EVT_CB_SELCHANGE = 19000
    EVT_CB_DROPDOWN = 19001

    EVT_CALENDAR_SELDAY = 20000
    EVT_CALENDAR_SETDATE = 20001
    EVT_CALENDAREX_CHANGED = 20002
    EVT_DATETIME_CHANGED = 20003

    EVT_SPIN_VALUE2STRING = 21000

    EVT_SPLIT_PANE_MOVED = 22000

    EVT_HOT_KEY_SET = 23000

    #图片动画开始，结束事件
    EVT_ANI_START = 22100
    EVT_ANI_STOP = 22101

    EVT_SELECTMENU = 22150
    EVT_POPMENU = 22151

    EVT_EXTERNAL_BEGIN = 10000000
    
    EVT_CAPTURE = 10000100
    EVT_CAPTURE_FINISH = 10000101
    
    EVT_SWITCH_CHANGED = 10000800

class MB:
    MB_OK = 0x00000000
    MB_OKCANCEL = 0x00000001
    MB_ABORTRETRYIGNORE = 0x00000002
    MB_YESNOCANCEL = 0x00000003
    MB_YESNO = 0x00000004
    MB_RETRYCANCEL = 0x00000005
    #if(WINVER >= 0x0500)
    MB_CANCELTRYCONTINUE = 0x00000006
    #endif /* WINVER >= 0x0500 */

    MB_ICONHAND = 0x00000010
    MB_ICONQUESTION = 0x00000020
    MB_ICONEXCLAMATION = 0x00000030
    MB_ICONASTERISK = 0x00000040

    #if(WINVER >= 0x0400)
    MB_USERICON = 0x00000080
    MB_ICONWARNING = MB_ICONEXCLAMATION
    MB_ICONERROR = MB_ICONHAND
    #endif /* WINVER >= 0x0400 */

    MB_ICONINFORMATION = MB_ICONASTERISK
    MB_ICONSTOP = MB_ICONHAND

    MB_DEFBUTTON1 = 0x00000000
    MB_DEFBUTTON2 = 0x00000100
    MB_DEFBUTTON3 = 0x00000200
    #if(WINVER >= 0x0400)
    MB_DEFBUTTON4 = 0x00000300
    #endif /* WINVER >= 0x0400 */

    MB_APPLMODAL = 0x00000000
    MB_SYSTEMMODAL = 0x00001000
    MB_TASKMODAL = 0x00002000
    #if(WINVER >= 0x0400)
    MB_HELP = 0x00004000 #// Help Button
    #endif /* WINVER >= 0x0400 */

    MB_NOFOCUS = 0x00008000
    MB_SETFOREGROUND = 0x00010000
    MB_DEFAULT_DESKTOP_ONLY = 0x00020000

    #if(WINVER >= 0x0400)
    MB_TOPMOST = 0x00040000
    MB_RIGHT = 0x00080000
    MB_RTLREADING = 0x00100000

    #endif /* WINVER >= 0x0400 */

    #ifdef _WIN32_WINNT
    #if (_WIN32_WINNT >= 0x0400)
    MB_SERVICE_NOTIFICATION = 0x00200000

    MB_SERVICE_NOTIFICATION_NT3X = 0x00040000
    #endif

    MB_TYPEMASK = 0x0000000F
    MB_ICONMASK = 0x000000F0
    MB_DEFMASK = 0x00000F00
    MB_MODEMASK = 0x00003000
    MB_MISCMASK = 0x0000C000

class DialogID:
    IDOK = 1
    IDCANCEL = 2
    IDABORT = 3
    IDRETRY = 4
    IDIGNORE = 5
    IDYES = 6
    IDNO = 7
    #if(WINVER >= 0x0400)
    IDCLOSE = 8
    IDHELP = 9
    #endif /* WINVER >= 0x0400 */

    #if(WINVER >= 0x0500)
    IDTRYAGAIN = 10
    IDCONTINUE = 11
    #endif /* WINVER >= 0x0500 */

    #if(WINVER >= 0x0501)
    #ifndef IDTIMEOUT
    IDTIMEOUT = 32000
    #endif
    #endif /* WINVER >= 0x0501 */

class SingletonType:
    SINGLETON_UIDEF = 0
    SINGLETON_SWNDMGR = 1
    SINGLETON_TIMER = 2
    SINGLETON_SCRIPTTIMER = 3
    SINGLETON_FONTPOOL = 4
    SINGLETON_STYLEPOOLMGR = 5
    SINGLETON_TEMPLATEPOOLMGR = 6
    SINGLETON_SKINPOOLMGR = 7
    SINGLETON_WINDOWFINDER = 8
    SINGLETON_TEXTSERVICEHELPER = 9
    SINGLETON_RICHEDITMENUDEF = 10
    SINGLETON_SIMPLEWNDHELPER = 11
    SINGLETON_HOSTMGR = 12
    SINGLETON_NOTIFYCENTER = 13
    SINGLETON_COUNT = 14

class SObjectType:
    None_ = -1
    Undef = 0
    NativeWnd = 1
    Window = 2
    Skin = 3
    Layout = 4
    Event = 5
    Interpolator = 6
    Animation = 7
    ValueAnimator = 8
    UserType = 9

Singleton_OBJS = {
    SingletonType.SINGLETON_NOTIFYCENTER: SNotifyCenter
}

class XmlEncoding:
    enc_auto = 0
    enc_utf8 = 1
    enc_utf16_le = 2
    enc_utf16_be = 3
    enc_utf16 = 4
    enc_utf32_le = 5
    enc_utf32_be = 6
    enc_utf32 = 7
    enc_wchar = 8
    enc_latin1 = 9
    enc_bin = 10

class XmlParseOpt:
    xml_parse_minimal = 0x0000
    xml_parse_pi = 0x0001
    xml_parse_comments = 0x0002
    xml_parse_cdata = 0x0004
    xml_parse_ws_pcdata = 0x0008
    xml_parse_escapes = 0x0010
    xml_parse_eol = 0x0020
    xml_parse_wconv_attribute = 0x0040
    xml_parse_wnorm_attribute = 0x0080
    xml_parse_declaration = 0x0100
    xml_parse_doctype = 0x0200
    xml_parse_ws_pcdata_single = 0x0400
    xml_parse_trim_pcdata = 0x0800
    xml_parse_fragment = 0x1000
    xml_parse_embed_pcdata = 0x2000
    xml_parse_default = 0x0074
    xml_parse_full = 0x0337

class SOUI:
    SOUI_FACTORY: SouiFactory = None
    APP: SApplication = None
    DECODER_FACTORY: SImgDecoderFactory = None
    RENDER_FACTORY: SRenderFactory = None
    NOTIFY_CENTER: SNotifyCenter = None
    
def SMessageBox(hWnd, lpText, lpCaption, uType=0) -> int: ...

def SRUNONUISYNC(func): ...
def SRUNONUI(func): ...

class OwnerPointer:
    def ptr(self) -> int: ...
    def free(self): ...
    
class SObjRef(OwnerPointer):
    def AddRef(self) -> int: ...
    def Release(self) -> int: ...
    def OnFinalRelease(self): ...
    
class SObject(SObjRef):
    def IsClass(self, lpszName) -> bool: ...
    def GetObjectClass(self) -> str: ...
    def GetObjectType(self) -> int: ...
    def GetID(self) -> int: ...
    def SetID(self, nID): ...
    def GetName(self) -> str: ...
    def SetName(self, pszName): ...
    def InitFromXml(self, xmlNode) -> bool: ...
    def OnInitFinished(self, xmlNode): ...
    def SetAttribute(self, pszAttr, pszValue, bLoading=True) -> int: ...
    def GetAttribute(self, strAttr) -> str: ...
    def AfterAttribute(self, pszAttr, pszValue, bLoading, hr) -> int: ...
    def SetAttrHandler(self, attrHandler): ...

class SouiFactory(SObjRef):
    def __init__(self, hinstance): ...
    # 创建对象接口
    def CreateApp(self, render_factory, class_name='SOUI4') -> SApplication: ...
    def CreateNativeWnd(self) -> SNativeWnd: ...
    def CreateHostWnd(self, pszResID) -> SHostWnd: ...
    def CreateHostDialog(self, pszResID) -> SHostDialog: ...
    #def CreateStringA(self, pszStr) -> SStringA: ...
    def CreateStringW(self, pszStr) -> SStringW: ...
    def CreateXmlDoc(self) -> SXmlDoc: ...
    def CreateResProvider(self, resType) -> SResProvider: ...
    def CreateFuncSlot(self, func) -> SEvtSlot: ...
    def CreateMenu(self, hMenu=0) -> SMenu: ...
    def CreateMenuEx(self) -> SMenuEx: ...
    # 创建图片解码引擎
    def CreateImgDecoder_Stb(self) -> SImgDecoderFactory: ...
    # 创建渲染引擎
    def CreateRender_GDI(self) -> SRenderFactory: ...
    def CreateRender_Skia(self) -> SRenderFactory: ...
    def CreateLog4z(self) -> SLog4zManager: ...
    def CreateResProvider_7ZIP(self) -> SResProvider: ...
    def CreateResProvider_ZIP(self) -> SResProvider: ...
    def CreateScrpit_Lua(self) -> SScriptFactory: ...
    def CreateTaskLoop(self) -> STaskLoop: ...
    def CreateTranslator(self) -> STranslatorMgr: ...

class SApplication(SObjRef):
    def GetModule(self): ...
    def LoadSystemNamedResource(self, pResProvider): ...
    def GetTranslator(self) -> STranslatorMgr: ...
    def SetTranslator(self, pTrans): ...
    def GetToolTipFactory(self) -> SToolTipFactory: ...
    def SetToolTipFactory(self, pToolTipFac): ...
    def SetMsgLoopFactory(self, pMsgLoopFac): ...
    def GetMsgLoopFactory(self) -> SMsgLoopFactory: ...
    def SetLogManager(self, pLogMgr): ...
    def GetLogManager(self) -> SLog4zManager: ...
    def SetAttrStorageFactory(self, pAttrStorageFactory): ...
    def GetAttrStorageFactory(self) -> SAttrStorageFactory: ...
    def Run(self, hMainWnd): ...
    def GetMainWnd(self): ...
    def AddMsgLoop(self, pMsgLoop): ...
    def RemoveMsgLoop(self): ...
    def GetMsgLoop(self, dwThreadID) -> SMessageLoop: ...
    def GetResProviderMgr(self) -> SResProviderMgr: ...
    def GetRealWndHander(self) -> SRealWndHandler: ...
    def SetRealWndHandler(self, pRealHandler): ...
    def GetRenderFactory(self) -> SRenderFactory: ...
    def SetScriptFactory(self, pScriptModule): ...
    def InitXmlNamedID(self, pNames, nIds): ...
    def LoadXmlDocment(self, strResId) -> SXmlDoc: ...
    def LoadAnimation(self, strResId) -> SAnimation: ...
    def LoadValueAnimator(self, strResId) -> SValueAnimator: ...
    def EnableNotifyCenter(self, bEnable, interval=20): ...
    def GetInnerSingleton(self, type): ...
    def CreateObject(self, pszName, nType) -> SObject: ...
    def SetCreateObjectCallback(self, cbCreateObj): ...

class SNotifyCenter(OwnerPointer):
    def FireEventSync(self, e): ...
    def FireEventAsync(self, e): ...
    def RegisterEventMap(self, slot): ...
    def UnregisterEventMap(self, slot): ...
    def RunOnUI(self, pRunnable, bSync=True): ...
    def RunOnUI2(self, func, bSync=True): ...

class SRenderTarget(SObjRef):
    def CreatePen(self, iStyle, cr, cWidth) -> SPenS: ...
    def CreateSolidColorBrush(self, cr) -> SBrushS: ...
    def CreateBitmapBrush(self, pBmp) -> SBrushS: ...
    def CreateRegion(self) -> SRegionS: ...
    def Resize(self, sz): ...
    def OffsetViewportOrg(self, xOff, yOff, lpPoint): ...
    def GetViewportOrg(self, lpPoint): ...
    def SetViewportOrg(self, pt): ...
    def PushClipRect(self, pRect, mode): ...
    def PushClipRegion(self, pRegion, mode): ...
    def PopClip(self): ...
    def ExcludeClipRect(self, pRc): ...
    def IntersectClipRect(self, pRc): ...
    def SaveClip(self): ...
    def RestoreClip(self, nState): ...
    def GetClipRegion(self) -> SRegionS: ...
    def GetClipBox(self): ...
    def DrawText(self, pszText, cchLen, rc, uFormat): ...
    def MeasureText(self, pszText, cchLen): ...
    def TextOut(self, x, y, lpszString, nCount): ...
    def DrawRectangle(self, pRect): ...
    def FillRectangle(self, pRect): ...
    def FillSolidRect(self, pRect, cr): ...
    def DrawRoundRect(self, pRect): ...
    def FillRoundRect(self, pRect): ...
    def FillSolidRoundRect(self, pRect, cr): ...
    def ClearRect(self, pRect, cr): ...
    def InvertRect(self, pRect): ...
    def DrawEllipse(self, pRect): ...
    def FillEllipse(self, pRect): ...
    def FillSolidEllipse(self, pRect, cr): ...
    def DrawArc(self, pRect, startAngle, sweepAngle, useCenter): ...
    def FillArc(self, pRect, startAngle, sweepAngle): ...
    def DrawLines(self, pts): ...
    def GradientFill(self, pRect, bVert, crBegin, crEnd, byAlpha): ...
    def GradientFillEx(self, pRect, pts, colors, pos, byAlpha): ...
    def GradientFill2(self, pRect, type, crStart, crCenter, crEnd, fLinearAngle, fCenterX, fCenterY, nRadius, byAlpha): ...
    def DrawIconEx(self, xLeft, yTop, hIcon, cxWidth, cyWidth, diFlags): ...
    def DrawBitmap(self, pRcDest, pBitmap, xSrc, ySrc, byAlpha): ...
    def DrawBitmapEx(self, pRcDest, pBitmap, pRcSrc, expendMode, byAlpha): ...
    def DrawBitmap9Patch(self, pRcDest, pBitmap, pRcSrc, pRcSourMargin, expendMode, byAlpha): ...
    def BitBlt(self, pRcDest, pRTSour, xSrc, ySrc, dwRop): ...
    def AlphaBlend(self, pRcDest, pRTSrc, pRcSrc, byAlpha): ...
    def GetCurrentObject(self, uType) -> SRenderObj: ...
    def SelectDefaultObject(self, objType) -> SRenderObj: ...
    def SelectObject(self, pObj) -> SRenderObj: ...
    def GetTextColor(self): ...
    def SetTextColor(self, color): ...
    def SetMaskFilter(self, pMaskFilter): ...
    def GetMaskFilter(self) -> SMaskFilter: ...
    def GetDC(self, uFlag): ...
    def ReleaseDC(self, hdc): ...
    def SetTransform(self, matrix, oldMatrix): ...
    def GetTransform(self, matrix): ...
    def GetPixel(self, x, y): ...
    def SetPixel(self, x, y, cr): ...
    def PushClipPath(self, path, mode, doAntiAlias): ...
    def DrawPath(self, path, pathEffect): ...
    def FillPath(self, path): ...
    def PushLayer(self, pRect, byAlpha): ...
    def PopLayer(self): ...
    def SetXfermode(self, mode, pOldMode): ...
    def SetAntiAlias(self, bAntiAlias): ...
    def GetAntiAlias(self): ...

class ZIPRES_PARAM(OwnerPointer):
    def ZipFile(self, zipFile, childDir=None, pwd=None): ...
    def ZipResource(self, hInst, pszResName, pszResType='zip', childDir=None, pwd=None): ...
    def ZipMemory(self, buffer, childDir=None, pwd=None): ...

class ZIP7RES_PARAM(OwnerPointer):
    def ZipFile(self, zipFile, childDir=None, pwd=None): ...
    def ZipResource(self, hInst, pszResName, pszResType='zip', childDir=None, pwd=None): ...

class SResProvider(SObjRef):
    def Init(self, wParam, lParam=0): ...
    def HasResource(self, pszType, pszResName): ...
    def LoadIcon(self, pszResName, cx, cy): ...
    def LoadBitmap(self, pszResName): ...
    def LoadCursor(self, pszResName): ...
    def LoadImage(self, pszType, pszResName) -> SBitmapS: ...
    def LoadImgX(self, pszType, pszResName) -> SImgX: ...
    def GetRawBufferSize(self, pszType, pszResName): ...
    def GetRawBuffer(self, pszType, pszResName, pBufBytes): ...
    def EnumResource(self, funEnumCB, lp): ...

class SResProviderMgr(SObjRef):
    def AddResProvider(self, pResProvider, pszUidef): ...
    def RemoveResProvider(self, pResProvider): ...
    def RemoveAll(self): ...
    def GetHeadResProvider(self) -> SResProvider: ...
    def GetTailResProvider(self) -> SResProvider: ...
    def SetFilePrefix(self, pszFilePrefix): ...
    def HasResource(self, pszType, pszResName): ...
    def LoadIcon(self, pszResName, cx, cy, bFromFile): ...
    def LoadCursor(self, pszResName, bFromFile): ...
    def LoadBitmap(self, pszResName, bFromFile): ...
    def LoadImage(self, pszType, pszResName) -> SBitmapS: ...
    def LoadImgX(self, pszType, pszResName) -> SImgX: ...
    def GetRawBufferSize(self, pszType, pszResName): ...
    def GetRawBuffer(self, pszType, pszResName, pBufBytes): ...

class SImgDecoderFactory(SObjRef):
    def CreateImgX(self) -> SImgX: ...
    def SaveImage(self, pBits, nWid, nHei, pszFileName, pFormat): ...
    def GetDescription(self): ...

class SRenderFactory(SObjRef):
    def GetImgDecoderFactory(self): ...
    def SetImgDecoderFactory(self, pImgDecoderFac): ...
    def CreateRenderTarget(self, nWid, nHei) -> SRenderTarget: ...
    def CreateFont(self, lf) -> SFontS: ...
    def CreateBitmap(self) -> SBitmapS: ...
    def CreateRegion(self) -> SRegionS: ...
    def CreateBlurMaskFilter(self, radius, style, flag) -> SMaskFilter: ...
    def CreateEmbossMaskFilter(self, direction, ambient, specular, blurRadius) -> SMaskFilter: ...
    def CreatePath(self) -> SPathS: ...
    def CreatePathEffect(self, guidEffect) -> SPathEffect: ...
    def CreatePathMeasure(self) -> SPathMeasure: ...

class STranslatorMgr(SObjRef):
    def SetLanguage(self, strLang): ...
    def GetLanguage(self): ...
    def CreateTranslator(self) -> STranslator: ...
    def InstallTranslator(self, ppTranslator): ...
    def UninstallTranslator(self, id): ...
    def tr(self, strSrc, strCtx, pszOut, nLen): ...

class STranslator(SObjRef):
    def Load(self, pData, uType): ...
    def GetName(self, szBuf): ...
    def NameEqual(self, pszName): ...
    def guid(self): ...
    def tr(self, strSrc, strCtx, pszOut, nLen): ...
    def getFontInfo(self): ...

class SToolTipFactory(SObjRef):
    def CreateToolTip(self, hHost) -> SToolTip: ...
    def DestroyToolTip(self, pToolTip): ...

class SMsgFilter(OwnerPointer):
    def PreTranslateMessage(self, pMsg): ...

class SToolTip(SMsgFilter):
    def UpdateTip(self, tipid, rc, pszTip, nScale): ...
    def ClearTip(self): ...
    def RelayEvent(self, pMsg): ...

class SMsgLoopFactory(SObjRef):
    def CreateMsgLoop(self) -> SMessageLoop: ...

class SMessageLoop(SObjRef):
    def AddMessageFilter(self, pMessageFilter): ...
    def RemoveMessageFilter(self, pMessageFilter): ...
    def AddIdleHandler(self, pIdleHandler): ...
    def RemoveIdleHandler(self, pIdleHandler): ...
    def PreTranslateMessage(self, pMsg): ...
    def OnIdle(self, nIdleCount): ...
    def Run(self): ...
    def IsRunning(self): ...
    def OnMsg(self, pMsg): ...
    def Quit(self): ...
    def PostTask(self, runable): ...
    def RemoveTasksForObject(self, pObj): ...

class SIdleHandler(OwnerPointer):
    def OnIdle(self): ...

class SRunnable(SObjRef):
    def clone(self) -> SRunnable: ...
    def run(self): ...
    def getObject(self): ...
    def getClassInfo(self): ...

class SLog4zManager(SObjRef):
    def config(self, configPath): ...
    def configFromString(self, configContent): ...
    def createLogger(self, key): ...
    def start(self): ...
    def stop(self): ...
    def findLogger(self, key): ...
    def prePushLog(self, id, level): ...
    def prePushLog2(self, name, level): ...
    def pushLog(self, id, level, filter, log, file, line, func, pRetAddr): ...
    def pushLog2(self, name, level, filter, log, file, line, func, pRetAddr): ...
    def enableLogger(self, id, enable): ...
    def setLoggerName(self, id, name): ...
    def setLoggerPath(self, id, path): ...
    def setLoggerLevel(self, id, nLevel): ...
    def setLoggerFileLine(self, id, enable): ...
    def setLoggerDisplay(self, id, enable): ...
    def setLoggerOutFile(self, id, enable): ...
    def setLoggerLimitsize(self, id, limitsize): ...
    def setOutputFileBuilder(self, pOutputFileBuilder): ...
    def setAutoUpdate(self, interval): ...
    def updateConfig(self): ...
    def isLoggerEnable(self, id): ...
    def getStatusActiveLoggers(self): ...
    def setOutputListener(self, pListener): ...

class SAttrStorageFactory(SObjRef):
    def CreateAttrStorage(self, owner): ...

class STaskLoop(SObjRef):
    def getName(self, pszBuf, nBufLen): ...
    def start(self, pszName, priority): ...
    def stop(self): ...
    def postTask(self, runnable, waitUntilDone, priority): ...
    def cancelTasksForObject(self, object): ...
    def cancelTask(self, taskId): ...
    def getTaskCount(self): ...
    def isRunning(self): ...
    def getRunningTaskInfo(self, buf, bufLen): ...

class SRealWndHandler(SObjRef):
    def OnRealWndCreate(self, pRealWnd): ...
    def OnRealWndDestroy(self, pRealWnd): ...
    def OnRealWndInit(self, pRealWnd): ...
    def OnRealWndSize(self, pRealWnd): ...
    def OnRealWndPosition(self, pRealWnd): ...

class SScriptFactory(SObjRef):
    def CreateScriptModule(self) -> SScriptModule: ...

class SScriptModule(SObjRef):
    def GetScriptEngine(self): ...
    def executeScriptFile(self, pszScriptFile): ...
    def executeScriptBuffer(self, buff, sz): ...
    def executeString(self, str): ...
    def executeScriptedEventHandler(self, handler_name, pEvt): ...
    def getIdentifierString(self): ...

class SAnimation(SObject):
    def clone(self) -> SAnimation: ...
    def copy(self, src): ...
    def reset(self): ...
    def cancel(self): ...
    def setInterpolator(self, i): ...
    def setDuration(self, durationMillis): ...
    def scaleCurrentDuration(self, scale): ...
    def setFillBefore(self, bFill): ...
    def setFillAfter(self, bFill): ...
    def getFillBefore(self): ...
    def getFillAfter(self): ...
    def setStartOffset(self, offset): ...
    def isFillEnabled(self): ...
    def setFillEnabled(self, fillEnabled): ...
    def setStartTime(self, startTimeMillis): ...
    def start(self): ...
    def startNow(self): ...
    def setRepeatMode(self, repeatMode): ...
    def setRepeatCount(self, repeatCount): ...
    def setZAdjustment(self, zAdjustment): ...
    def getInterpolator(self) -> SInterpolator: ...
    def getStartTime(self): ...
    def getDuration(self): ...
    def getStartOffset(self): ...
    def getRepeatMode(self): ...
    def getRepeatCount(self): ...
    def getZAdjustment(self): ...
    def setAnimationListener(self, listener): ...
    def computeDurationHint(self): ...
    def getTransformation2(self, currentTime, outTransformation, scale): ...
    def getTransformation(self, currentTime, outTransformation): ...
    def hasStarted(self): ...
    def hasEnded(self): ...
    def applyTransformation(self, interpolatedTime, t): ...
    def hasAlpha(self): ...
    def initialize(self, width, height, parentWidth, parentHeight): ...
    def setUserData(self, data): ...
    def getUserData(self): ...

class SAnimationListener(OwnerPointer):
    def OnAnimationStart(self, animation): ...
    def OnAnimationStop(self, animation): ...
    def OnAnimationRepeat(self, animation): ...

class STransformation(OwnerPointer):
    def GetMatrix(self) -> SMatrix: ...
    def GetAlpha(self): ...
    def SetAlpha(self, alpha): ...
    def Clear(self): ...
    def SetTransformationType(self, type): ...
    def Compose(self, t): ...

class SInterpolator(SObject):
    def getInterpolation(self, input): ...

class SValueAnimator(SObject):
    def setDuration(self, duration): ...
    def getDuration(self): ...
    def getTotalDuration(self): ...
    def setCurrentPlayTime(self, playTime): ...
    def setCurrentFraction(self, fraction): ...
    def getCurrentPlayTime(self): ...
    def getStartDelay(self): ...
    def setStartDelay(self, startDelay): ...
    def setRepeatCount(self, value): ...
    def getRepeatCount(self): ...
    def setRepeatMode(self, value): ...
    def getRepeatMode(self): ...
    def addUpdateListener(self, listener): ...
    def removeAllUpdateListeners(self): ...
    def removeUpdateListener(self, listener): ...
    def setInterpolator(self, value): ...
    def getInterpolator(self) -> SInterpolator: ...
    def addListener(self, p): ...
    def removeListener(self, p): ...
    def start(self, pContainer): ...
    def end(self): ...
    def isRunning(self): ...
    def isStarted(self): ...
    def reverse(self): ...
    def commitAnimationFrame(self, frameTime): ...
    def getAnimatedFraction(self): ...
    def clone(self) -> SValueAnimator: ...
    def onEvaluateValue(self, fraction): ...

class SAnimatorUpdateListener(OwnerPointer):
    def onAnimationUpdate(self, pAnimator): ...

class SAnimatorListener(OwnerPointer):
    def onAnimationStart(self, pAnimator): ...
    def onAnimationEnd(self, pAnimator): ...
    def onAnimationRepeat(self, pAnimator): ...

class STimelineHandlersMgr(OwnerPointer):
    def RegisterTimelineHandler(self, pHandler): ...
    def UnregisterTimelineHandler(self, pHandler): ...

class STimelineHandler(OwnerPointer):
    def OnNextFrame(self): ...

class SImgFrame(OwnerPointer):
    def GetSize(self, pWid, pHei): ...
    def CopyPixels(self, rc, cbStride, pbBuffer): ...
    def GetDelay(self): ...

class SMaskFilter(SObjRef):
    def GetPtr(self): ...

class SPathMeasure(SObjRef):
    def setPath(self, path, forceClosed): ...
    def getLength(self): ...
    def getPosTan(self, distance, pos, tan): ...
    def getSegment(self, startD, stopD, dst, startWithMoveTo): ...

class SSwndContainer(STimelineHandlersMgr):
    def RegisterDragDrop(self, swnd, pDropTarget): ...
    def UnregisterDragDrop(self, swnd): ...
    def OnFireEvent(self, evt): ...
    def GetMsgLoop(self) -> SMessageLoop: ...
    def GetScriptModule(self) -> SScriptModule: ...
    def GetCaret(self) -> SCaret: ...
    def GetHostHwnd(self): ...
    def IsTranslucent(self): ...
    def IsSendWheel2Hover(self): ...
    def GetScale(self): ...
    def GetTranslatorContext(self): ...
    def GetContainerRect(self): ...
    def OnGetRenderTarget(self, rc, gdcFlags) -> SRenderTarget: ...
    def OnReleaseRenderTarget(self, pRT, rc, gdcFlags): ...
    def OnRedraw(self, rc): ...
    def OnCavasInvalidate(self, swnd): ...
    def OnGetSwndCapture(self): ...
    def OnSetSwndCapture(self, swnd): ...
    def OnReleaseSwndCapture(self): ...
    def GetHover(self): ...
    def GetFocus(self): ...
    def OnSetSwndFocus(self, swnd): ...
    def UpdateWindow(self): ...
    def UpdateTooltip(self): ...
    def FrameToHost(self, rc): ...
    def GetAcceleratorMgr(self) -> SAcceleratorMgr: ...
    def RegisterTrackMouseEvent(self, swnd): ...
    def UnregisterTrackMouseEvent(self, swnd): ...
    def MarkWndTreeZorderDirty(self): ...
    def BuildWndTreeZorder(self): ...
    def EnableIME(self, bEnable): ...
    def OnUpdateCursor(self): ...

class SCaret(SObject):
    def Init(self, hBmp, nWid, nHei): ...
    def SetPosition(self, x, y): ...
    def SetVisible(self, bVisible, owner): ...
    def IsVisible(self): ...
    def Draw(self, pRT): ...
    def GetRect(self): ...

class SAcceleratorMgr(OwnerPointer):
    def RegisterAccelerator(self, pAcc, target): ...
    def UnregisterAccelerator(self, pAcc, target): ...
    def UnregisterAccelerators(self, target): ...

class SAccelerator(OwnerPointer):
    def GetModifier(self): ...
    def GetKey(self): ...
    def GetAcc(self): ...

class SAcceleratorTarget(OwnerPointer):
    def OnAcceleratorPressed(self, acc): ...

class SMatrix(OwnerPointer):
    def Data(self): ...
    def reset(self): ...
    def setIdentity(self): ...
    def isIdentity(self): ...
    def setTranslate(self, dx, dy): ...
    def setScale(self, sx, sy): ...
    def setScale2(self, sx, sy, px, py): ...
    def setRotate(self, degrees): ...
    def setRotate2(self, degrees, px, py): ...
    def setSkew(self, kx, ky): ...
    def setSkew2(self, kx, ky, px, py): ...

class SNcPainter(SObject):
    def GetRoot(self) -> SWindow: ...

class SXmlDoc(SObjRef):
    def GetPrivPtr(self): ...
    def Reset(self): ...
    def Copy(self, proto): ...
    def LoadString(self, contents, options=XmlParseOpt.xml_parse_default): ...
    def LoadFile(self, path, options=XmlParseOpt.xml_parse_default, encoding=XmlEncoding.enc_auto): ...
    def LoadBuffer(self, contents, size, options=XmlParseOpt.xml_parse_default, encoding=XmlEncoding.enc_auto): ...
    def LoadBufferInplace(self, contents, size, options=XmlParseOpt.xml_parse_default, encoding=XmlEncoding.enc_auto): ...
    def LoadBufferInplaceOwn(self, contents, size, options=XmlParseOpt.xml_parse_default, encoding=XmlEncoding.enc_auto): ...
    def GetParseResult(self): ...
    def SaveBinary(self, f): ...
    def SaveFile(self, path, indent, flags, encoding=XmlEncoding.enc_auto): ...
    def Root(self) -> SXmlNode: ...

class SXmlNode(SObjRef):
    def ToString(self): ...
    def GetPrivPtr(self): ...
    def Empty(self): ...
    def Name(self): ...
    def Value(self): ...
    def Text(self): ...
    def set_userdata(self, data): ...
    def get_userdata(self): ...
    def Attribute(self, name, bCaseSensitive=True) -> SXmlAttr: ...
    def FirstAttribute(self) -> SXmlAttr: ...
    def LastAttribute(self) -> SXmlAttr: ...
    def Child(self, name, bCaseSensitive=True) -> SXmlNode: ...
    def FirstChild(self) -> SXmlNode: ...
    def LastChild(self) -> SXmlNode: ...
    def NextSibling(self) -> SXmlNode: ...
    def PrevSibling(self) -> SXmlNode: ...
    def NextSibling2(self, name, bCaseSensitive=True) -> SXmlNode: ...
    def PrevSibling2(self, name, bCaseSensitive=True) -> SXmlNode: ...

class SXmlAttr(SObjRef):
    def GetPrivPtr(self): ...
    def Empty(self): ...
    def Name(self): ...
    def Value(self): ...
    def set_userdata(self, data): ...
    def get_userdata(self): ...
    def Next(self) -> SXmlAttr: ...
    def Prev(self) -> SXmlAttr: ...

class SStringW(SObjRef):
    def GetLength(self): ...
    def IsEmpty(self): ...
    def Empty(self): ...
    def GetAt(self, nIndex): ...
    def SetAt(self, nIndex, ch): ...
    def c_str(self): ...
    def Compare(self, psz): ...
    def CompareNoCase(self, psz): ...
    def TrimBlank(self): ...
    def InsertChar(self, nIndex, ch): ...
    def Insert(self, nIndex, psz): ...
    def Delete(self, nIndex, nCount): ...
    def ReplaceChar(self, chOld, chNew): ...
    def Replace(self, pszOld, pszNew): ...
    def Remove(self, chRemove): ...
    def FindChar(self, ch, nStart): ...
    def ReverseFind(self, ch): ...
    def Find(self, pszSub, nStart): ...
    def GetBuffer(self, nMinBufLength): ...
    def ReleaseBuffer(self, nNewLength): ...
    def GetBufferSetLength(self, nNewLength): ...
    def SetLength(self, nLength): ...
    def Copy(self, src): ...
    def Assign(self, src): ...
    def Assign2(self, src, nLen): ...
    def GetPrivData(self): ...

class SRenderObj(SObjRef):
    def GetRenderFactory(self) -> SRenderFactory: ...
    def ObjectType(self): ...

class SFontS(SRenderObj):
    def LogFont(self): ...
    def FamilyName(self): ...
    def TextSize(self): ...
    def IsBold(self): ...
    def IsUnderline(self): ...
    def IsItalic(self): ...
    def IsStrikeOut(self): ...
    def UpdateFont(self, pLogFont): ...
    def SetProp(self, pXmlNode): ...

class SBitmapS(SRenderObj):
    def Init(self, nWid, nHei, pBits): ...
    def Init2(self, pImgFrame): ...
    def LoadFromFile(self, pszFileName): ...
    def LoadFromBytes(self, img_bytes): ...
    def LoadFromMemory(self, buff, length): ...
    def Width(self): ...
    def Height(self): ...
    def Size(self): ...
    def LockPixelBits(self): ...
    def UnlockPixelBits(self, pBuf): ...
    def GetPixelBits(self): ...
    def Clone(self) -> SBitmapS: ...
    def Scale(self, nScale, filterLevel) -> SBitmapS: ...
    def Scale2(self, nWid, nHei, filterLevel) -> SBitmapS: ...
    def Save(self, pszFileName, pFormat): ...

class SRegionS(SRenderObj):
    def CombineRect(self, lprect, nCombineMode): ...
    def CombineRgn(self, pRgnSrc, nCombineMode): ...
    def CombineRoundRect(self, lprect, ptConner, nCombineMode): ...
    def CombineEllipse(self, lprect, nCombineMode): ...
    def CombinePolygon(self, pts, nPolygonMode, nCombineMode): ...
    def PtInRegion(self, pt): ...
    def RectInRegion(self, lprect): ...
    def GetRgnBox(self): ...
    def IsEmpty(self): ...
    def Offset(self, pt): ...
    def Clear(self): ...
    def IsEqual(self, testRgn): ...

class SPathS(SRenderObj):
    def getFillType(self): ...
    def setFillType(self, ft): ...
    def isInverseFillType(self): ...
    def toggleInverseFillType(self): ...
    def getConvexity(self): ...
    def setConvexity(self, c): ...
    def isConvex(self): ...
    def isOval(self): ...
    def reset(self): ...
    def rewind(self): ...
    def isEmpty(self): ...
    def isFinite(self): ...
    def isLine(self, line): ...
    def isRect(self): ...
    def countPoints(self): ...
    def getPoint(self, index): ...
    def getPoints(self, max): ...
    def countVerbs(self): ...
    def getVerbs(self, max): ...
    def getBounds(self): ...
    def moveTo(self, x, y): ...
    def rMoveTo(self, dx, dy): ...
    def lineTo(self, x, y): ...
    def rLineTo(self, dx, dy): ...
    def quadTo(self, x1, y1, x2, y2): ...
    def rQuadTo(self, dx1, dy1, dx2, dy2): ...
    def conicTo(self, x1, y1, x2, y2, w): ...
    def rConicTo(self, dx1, dy1, dx2, dy2, w): ...
    def cubicTo(self, x1, y1, x2, y2, x3, y3): ...
    def rCubicTo(self, x1, y1, x2, y2, x3, y3): ...
    def arcTo(self, oval, startAngle, sweepAngle, forceMoveTo): ...
    def arcTo2(self, x1, y1, x2, y2, radius): ...
    def close(self): ...
    def isRect2(self, isClosed, direction): ...
    def addRect(self, rect, dir): ...
    def addRect2(self, left, top, right, bottom, dir): ...
    def addOval(self, oval, dir): ...
    def addCircle(self, x, y, radius, dir): ...
    def addArc(self, oval, startAngle, sweepAngle): ...
    def addRoundRect(self, rect, rx, ry, dir): ...
    def addRoundRect2(self, rect, dir): ...
    def addPoly(self, pts, close): ...
    def addPath(self, src, dx, dy, mode): ...
    def reverseAddPath(self, src): ...
    def offset(self, dx, dy): ...
    def transform(self, matrix): ...
    def getLastPt(self): ...
    def setLastPt(self, x, y): ...
    def addString(self, pszText, nLen, x, y, pFont): ...
    def approximate(self, acceptableError) -> SPathInfo: ...

class SPathInfo(SObjRef):
    def pointNumber(self): ...
    def data(self): ...

class SPenS(SRenderObj):
    def GetWidth(self): ...
    def SetWidth(self, nWid): ...
    def GetStyle(self): ...
    def SetStyle(self, nStyle): ...
    def GetColor(self): ...
    def SetColor(self, cr): ...

class SBrushS(SRenderObj): ...

class SPathEffect(SObjRef):
    def GetRealPathEffect(self): ...

class SImgX(SObjRef):
    def LoadFromMemory(self, pBuf): ...
    def LoadFromFile(self, pszFileName): ...
    def GetFrameCount(self): ...
    def GetFrame(self, iFrame) -> SImgFrame: ...

class SSkinObj(SObject):
    def DrawByState2(self, pRT, rcDraw, dwState, byAlpha): ...
    def DrawByState(self, pRT, rcDraw, dwState): ...
    def DrawByIndex2(self, pRT, rcDraw, iState, byAlpha): ...
    def DrawByIndex(self, pRT, rcDraw, iState): ...
    def GetSkinSize(self): ...
    def GetStates(self): ...
    def GetAlpha(self): ...
    def SetAlpha(self, byAlpha): ...
    def OnColorize(self, cr): ...
    def GetScale(self): ...
    def Scale(self, nScale) -> SSkinObj: ...

class SWindow(SObject):
    def QueryInterface(self, IID): ...
    def GetContainer(self) -> SSwndContainer: ...
    def SetContainer(self, pContainer): ...
    def GetSwnd(self): ...
    def GetLayout(self): ...
    def GetLayoutParam(self): ...
    def SetLayoutParam(self, pLayoutParam): ...
    def IsFloat(self): ...
    def IsDisplay(self): ...
    def IsMsgTransparent(self): ...
    def IsClipClient(self): ...
    def SetToolTipText(self, pszText): ...
    def IsChecked(self): ...
    def SetCheck(self, bCheck): ...
    def IsDisabled(self, bCheckParent=False): ...
    def EnableWindow(self, bEnable, bUpdate=True): ...
    def IsVisible(self, bCheckParent=False): ...
    def SetVisible(self, bVisible, bUpdate=True): ...
    def GetUserData(self): ...
    def SetUserData(self, uData): ...
    def DoColorize(self, cr): ...
    def GetColorizeColor(self): ...
    def SSendMessage(self, uMsg, wParam, lParam, pbMsgHandled): ...
    def SDispatchMessage(self, uMsg, wParam, lParam): ...
    def IsFocusable(self): ...
    def IsFocused(self): ...
    def SetFocus(self): ...
    def KillFocus(self): ...
    def Invalidate(self): ...
    def InvalidateRect(self, lprect): ...
    def LockUpdate(self): ...
    def UnlockUpdate(self): ...
    def IsUpdateLocked(self): ...
    def Update(self): ...
    def SetWindowRgn(self, pRgn, bRedraw): ...
    def GetWindowRgn(self) -> SRegionS: ...
    def SetWindowPath(self, pPath, bRedraw): ...
    def GetWindowPath(self) -> SPathS: ...
    def Move2(self, x, y, cx, cy): ...
    def Move(self, rect): ...
    def GetWindowRect(self): ...
    def GetClientRect(self): ...
    def IsContainPoint(self, pt, bClientOnly): ...
    def SwndFromPoint(self, pt, bIncludeMsgTransparent): ...
    def SetTimer(self, id, uElapse): ...
    def KillTimer(self, id): ...
    def SetTimer2(self, id, uElapse): ...
    def KillTimer2(self, id): ...
    def GetCapture(self): ...
    def SetCapture(self): ...
    def ReleaseCapture(self): ...
    def SetAnimation(self, animation): ...
    def StartAnimation(self, animation): ...
    def GetAnimation(self) -> SAnimation: ...
    def ClearAnimation(self): ...
    def SetAlpha(self, byAlpha): ...
    def GetAlpha(self): ...
    def SetMatrix(self, mtx): ...
    def GetMatrix(self): ...
    def GetScale(self): ...
    def RequestRelayout(self): ...
    def UpdateLayout(self): ...
    def UpdateChildrenPosition(self): ...
    def IsLayoutDirty(self): ...
    def OnGetDlgCode(self): ...
    def GetRoot(self) -> SWindow: ...
    def GetParent(self) -> SWindow: ...
    def GetWindow(self, uCode) -> SWindow: ...
    def GetChild(self, iChild) -> SWindow: ...
    def GetChildrenCount(self): ...
    def IsDescendant(self, pTest): ...
    def SetOwner(self, pOwner): ...
    def GetOwner(self) -> SWindow: ...
    def BringWindowToTop(self): ...
    def AdjustZOrder(self, pInsertAfter): ...
    def InsertChild(self, pNewChild, pInsertAfter): ...
    def RemoveChild(self, pChild): ...
    def CreateChildrenFromXml(self, pszXml): ...
    def FindChildByID(self, nId, nDeep=-1) -> SWindow: ...
    def FindChildByID2(self, nId, classType: Type[T], nDeep=-1) -> T: ...
    def FindChildByName(self, pszName, nDeep=-1) -> SWindow: ...
    def FindChildByName2(self, pszName, classType: Type[T], nDeep=-1) -> T: ...
    def DestroyChild(self, pChild): ...
    def DestroyAllChildren(self): ...
    def Destroy(self): ...
    def GetNextLayoutChild(self, pCurChild) -> SWindow: ...
    def GetChildrenLayoutRect(self): ...
    def GetDesiredSize(self, nParentWid, nParentHei): ...
    def GetBkgndColor(self): ...
    def SetWindowText(self, lpszText: str): ...
    def GetWindowText(self, bRawText=True) -> str: ...
    def GetState(self): ...
    def ModifyState(self, dwStateAdd, dwStateRemove, bUpdate): ...
    def GetSelectedSiblingInGroup(self) -> SWindow: ...
    def GetSelectedChildInGroup(self) -> SWindow: ...
    def IsSiblingsAutoGroupped(self): ...
    def CreateCaret(self, pBmp, nWid, nHeight): ...
    def ShowCaret(self, bShow): ...
    def SetCaretPos(self, x, y): ...
    def SetEventMute(self, bMute): ...
    def SubscribeEvent(self, evtId, pSlot): ...
    def UnsubscribeEvent(self, evtId, pSlot): ...
    def FireEvent(self, evt): ...
    def FireCommand(self): ...
    def FireCtxMenu(self, pt): ...

class SNativeWnd(SObjRef):
    def CreateNative(self, lpWindowName, dwStyle, dwExStyle, x, y, nWidth, nHeight, hWndParent, nID, lpParam): ...
    def GetHwnd(self) -> int: ...
    def SubclassWindow(self, hWnd): ...
    def UnsubclassWindow(self, bForce): ...
    def GetCurrentMessage(self): ...
    def GetDlgCtrlID(self): ...
    def GetStyle(self): ...
    def GetExStyle(self): ...
    def GetWindowLongPtr(self, nIndex): ...
    def SetWindowLongPtr(self, nIndex, dwNewLong): ...
    def GetParent(self): ...
    def SetParent(self, hWndNewParent): ...
    def IsWindowEnabled(self): ...
    def ModifyStyle(self, dwRemove, dwAdd, nFlags): ...
    def ModifyStyleEx(self, dwRemove, dwAdd, nFlags): ...
    def SetWindowPos(self, hWndInsertAfter, x, y, cx, cy, nFlags): ...
    def CenterWindow(self, hWndCenter): ...
    def DestroyWindow(self): ...
    def IsWindow(self): ...
    def Invalidate(self, bErase): ...
    def InvalidateRect(self, lpRect, bErase): ...
    def GetWindowRect(self): ...
    def GetClientRect(self): ...
    def ClientToScreen(self, lpPoint): ...
    def ClientToScreen2(self, lpRect): ...
    def ScreenToClient(self, lpPoint): ...
    def ScreenToClient2(self, lpRect): ...
    def MapWindowPoints(self, hWndTo, lpPoint, nCount): ...
    def MapWindowRect(self, hWndTo, lpRect): ...
    def SetTimer(self, nIDEvent, nElapse): ...
    def KillTimer(self, nIDEvent): ...
    def GetDC(self): ...
    def GetWindowDC(self): ...
    def ReleaseDC(self, hDC): ...
    def CreateCaret(self, hBitmap): ...
    def HideCaret(self): ...
    def ShowCaret(self): ...
    def GetCapture(self): ...
    def SetCapture(self): ...
    def ReleaseCapture(self): ...
    def SetFocus(self): ...
    def SendMessage(self, message, wParam=0, lParam=0): ...
    def PostMessage(self, message, wParam, lParam): ...
    def SendNotifyMessage(self, message, wParam, lParam): ...
    def SetWindowText(self, lpszString: str): ...
    def GetWindowText(self) -> str: ...
    def IsIconic(self): ...
    def IsZoomed(self): ...
    def IsWindowVisible(self): ...
    def GetMsgHandler(self): ...
    def SetMsgHandler(self, msg_handler): ...
    def MoveWindow(self, x, y, nWidth, nHeight, bRepaint): ...
    def MoveWindow2(self, lpRect, bRepaint): ...
    def ShowWindow(self, nCmdShow): ...
    def SetWindowRgn(self, hRgn, bRedraw): ...
    def SetLayeredWindowAttributes(self, crKey, bAlpha, dwFlags): ...
    _hWnd: int

class SHostWnd(SNativeWnd):
    def CreateEx(self, hWndParent, dwStyle, dwExStyle, x, y, nWidth, nHeight): ...
    def Create(self, hWndParent=0, x=0, y=0, nWidth=0, nHeight=0): ...
    def SetLayoutId(self, pszLayoutId): ...
    def GetRoot(self) -> SWindow: ...
    def FindChildByID(self, nId, nDeep=-1) -> SWindow: ...
    def FindChildByID2(self, nId, classType: Type[T], nDeep=-1) -> T: ...
    def FindChildByName(self, pszName, nDeep=-1) -> SWindow: ...
    def FindChildByName2(self, pszName, classType: Type[T], nDeep=-1) -> T: ...
    def GetNcPainter(self) -> SNcPainter: ...
    def ShowWindow(self, nCmdShow): ...
    def GetEventHandler(self): ...
    def SetEventHandler(self, event_handler): ...

class SHostDialog(SHostWnd):
    def DoModal(self, hParent=0): ...
    def EndDialog(self, nResult): ...

class SEvtArgs(SObject):
    def Sender(self): ...
    def IdFrom(self): ...
    def SetIdFrom(self, id): ...
    def NameFrom(self): ...
    def SetNameFrom(self, name): ...
    def IsBubbleUp(self): ...
    def SetBubbleUp(self, bBubbleUp): ...
    def HandleCount(self): ...
    def IncreaseHandleCount(self): ...
    def Data(self): ...

class SEvtSlot(SObjRef):
    def Run(self, pArg): ...
    def Clone(self): ...
    def Equal(self, sour): ...
    def GetSlotType(self): ...

class SMenu(SObjRef):
    def Attach(self, hMenu): ...
    def Detach(self): ...
    def GetHMenu(self): ...
    def LoadMenu(self, resId): ...
    def LoadMenu2(self, xmlMenu): ...
    def SetIconSkin(self, icons): ...
    def InsertMenu(self, uPosition, uFlags, nIDNewItem, strText, iIcon, hIcon): ...
    def AppendMenu(self, uFlags, uIDNewItem, lpNewItem, iIcon, hIcon): ...
    def CheckMenuItem(self, uIdCheckItem, uCheck): ...
    def CheckMenuRadioItem(self, idFirst, idLast, idCheck, uFlags): ...
    def DeleteMenu(self, uPosition, uFlags): ...
    def TrackPopupMenu(self, uFlags, x, y, hWnd, nScale=0): ...
    def DestroyMenu(self): ...
    def ModifyMenuString(self, uPosition, uFlags, lpItemString): ...
    def SetMenuUserData(self, uPosition, uFlags, ulUserData): ...
    def GetMenuUserData(self, uPosition, uFlags): ...
    def GetContextHelpId(self): ...
    def SetContextHelpId(self, dwId): ...
    def GetSubMenu(self, nPos): ...

class SMenuEx(SObjRef):
    def LoadMenu(self, resId): ...
    def LoadMenu2(self, xmlMenu): ...
    def InsertMenu(self, uPosition, uFlags, id, strText, iIcon): ...
    def AppendMenu(self, uFlags, id, lpNewItem, iIcon): ...
    def CheckMenuItem(self, uIdCheckItem, uCheck): ...
    def CheckMenuRadioItem(self, idFirst, idLast, idCheck, uFlags): ...
    def DeleteMenu(self, uPosition, uFlags): ...
    def TrackPopupMenu(self, uFlags, x, y, hWnd, nScale=0): ...
    def DestroyMenu(self): ...
    def ModifyMenuString(self, uPosition, uFlags, lpItemString): ...
    def SetMenuUserData(self, uPosition, uFlags, ulUserData): ...
    def GetMenuUserData(self, uPosition, uFlags): ...
    def GetContextHelpId(self): ...
    def SetContextHelpId(self, dwId): ...
    def GetSubMenu(self, nPos): ...

class SCtrl(SObjRef):
    def ToWindow(self) -> SWindow: ...

class SOsrPanel(SCtrl):
    def SetItemIndex(self, index): ...
    def GetItemIndex(self): ...
    def SetItemData(self, dwData): ...
    def GetItemData(self): ...

class SItemPanel(SOsrPanel):
    def SetSkin(self, pSkin): ...
    def SetColor(self, crBk, crSelBk): ...

class SImageWnd(SCtrl):
    def SetSkin(self, pSkin, iFrame, bAutoFree): ...
    def GetSkin(self) -> SSkinObj: ...
    def SetImage(self, pBitmap, fl): ...
    def GetImage(self) -> SBitmapS: ...
    def SetIcon(self, nSubID): ...

class SAnimateImgWnd(SCtrl):
    def Start(self): ...
    def Stop(self): ...
    def IsPlaying(self): ...

class SProgress(SCtrl):
    def SetValue(self, nValue): ...
    def GetValue(self): ...
    def SetRange(self, nMin, nMax): ...
    def GetRange(self, pMin, pMax): ...
    def IsVertical(self): ...

class SIconWnd(SCtrl):
    def SetIcon(self, hIcon: int): ...

class SPanel(SCtrl):
    def ShowScrollBar(self, wBar, bShow): ...
    def EnableScrollBar(self, wBar, bEnable): ...
    def IsScrollBarEnable(self, bVertical): ...
    def SetScrollInfo(self, si, bVertical): ...
    def SetScrollPos(self, bVertical, nNewPos, bRedraw): ...
    def GetScrollPos(self, bVertical): ...
    def SetScrollRange(self, bVertical, nMinPos, nMaxPos, bRedraw): ...
    def GetScrollRange(self, bVertical, lpMinPos, lpMaxPos): ...
    def HasScrollBar(self, bVertical): ...

class SScrollView(SPanel):
    def GetViewSize(self): ...
    def SetViewSize(self, szView): ...
    def GetViewOrigin(self): ...
    def SetViewOrigin(self, pt): ...

class SHeaderCtrl(SCtrl):
    def InsertItem(self, iItem, pszText, nWidth, fmt, lParam, bDpiAware, fWeight): ...
    def GetItem(self, iItem, pItem): ...
    def SetItem(self, iItem, pItem): ...
    def GetItemCount(self): ...
    def GetTotalWidth(self, bMinWid): ...
    def IsAutoResize(self): ...
    def GetItemWidth(self, iItem): ...
    def DeleteItem(self, iItem): ...
    def DeleteAllItems(self): ...
    def SetItemSort(self, iItem, sortFlag): ...
    def SetItemVisible(self, iItem, visible): ...
    def IsItemVisible(self, iItem): ...

class SLvAdapter(SObjRef):
    def __init__(self): ...
    def from_ptr(ptr, owner=False): ...
    def notifyChanged(self): ...
    def notifyInvalidated(self): ...
    def notifyItemChanged(self, nItem): ...
    def getCount(self): ...
    def getView(self, position, pItem, xmlTemplate): ...
    def getItemViewType(self, position, dwState): ...
    def getViewTypeCount(self): ...
    def getViewDesiredSize(self, position, pItem, wid, hei): ...
    def isEmpty(self): ...
    def QueryInterface(self, id): ...

class SListView(SPanel):
    def SetAdapter(self, adapter): ...
    def GetAdapter(self): ...
    def GetItemLocator(self) -> SListViewItemLocator: ...
    def SetItemLocator(self, pItemLocator): ...
    def EnsureVisible(self, iItem): ...
    def SetSel(self, iItem, bNotify=False): ...
    def GetSel(self): ...
    def HitTest(self, pt) -> SItemPanel: ...

class SListViewItemLocator(SObjRef):
    def SetAdapter(self, adapter): ...
    def OnDataSetChanged(self): ...
    def IsFixHeight(self): ...
    def GetItemHeight(self, iItem): ...
    def SetItemHeight(self, iItem, nHeight): ...
    def GetTotalHeight(self): ...
    def Item2Position(self, iItem): ...
    def Position2Item(self, position): ...
    def GetScrollLineSize(self): ...
    def GetDividerSize(self): ...
    def SetScale(self, nScale): ...

class SMcAdapter(SLvAdapter):
    def __init__(self): ...
    def from_ptr(ptr, owner=False): ...
    def GetColumnName(self, iCol): ...
    def IsColumnVisible(self, iCol): ...
    def OnSort(self, iCol, pFmts): ...

class SMcListView(SPanel):
    def SetAdapter(self, adapter): ...
    def GetAdapter(self): ...
    def GetItemLocator(self) -> SListViewItemLocator: ...
    def SetItemLocator(self, pItemLocator): ...
    def EnsureVisible(self, iItem): ...
    def SetSel(self, iItem, bNotify=False): ...
    def GetSel(self): ...
    def HitTest(self, pt) -> SItemPanel: ...
    def GetIHeaderCtrl(self) -> SHeaderCtrl: ...
    def InsertColumn(self, nIndex, pszText, nWidth, fmt, lParam, bDpiAware, fWeight): ...
    def DeleteColumn(self, iCol): ...
    def GetColumnCount(self): ...

class STreeView(SPanel):
    def SetAdapter(self, adapter): ...
    def GetAdapter(self): ...
    def SetItemLocator(self, pItemLocator): ...
    def GetItemLocator(self) -> STreeViewItemLocator: ...
    def EnsureVisible(self, hItem): ...
    def SetSel(self, hItem, bNotify): ...
    def GetSel(self): ...
    def HitTest(self, pt) -> SItemPanel: ...

class STreeViewItemLocator(SObjRef):
    def SetAdapter(self, adapter): ...
    def OnBranchChanged(self, hItem): ...
    def OnBranchExpandedChanged(self, hItem, bExpandedOld, bExpandedNew): ...
    def GetTotalHeight(self): ...
    def GetTotalWidth(self): ...
    def Item2Position(self, hItem): ...
    def Position2Item(self, position): ...
    def GetScrollLineSize(self): ...
    def SetItemWidth(self, hItem, nWidth): ...
    def GetItemWidth(self, hItem): ...
    def SetItemHeight(self, hItem, nHeight): ...
    def GetItemHeight(self, hItem): ...
    def GetItemIndent(self, hItem): ...

class STileView(SPanel):
    def SetAdapter(self, adapter): ...
    def GetAdapter(self): ...
    def SetItemLocator(self, pItemLocator): ...
    def GetItemLocator(self) -> STileViewItemLocator: ...
    def EnsureVisible(self, iItem): ...
    def SetSel(self, iItem, bNotify): ...
    def GetSel(self): ...
    def HitTest(self, pt) -> SItemPanel: ...

class STileViewItemLocator(SObjRef):
    def SetAdapter(self, adapter): ...
    def OnDataSetChanged(self): ...
    def GetItemHeight(self, iItem): ...
    def SetItemHeight(self, iItem, nHeight): ...
    def GetItemRect(self, iItem): ...
    def SetTileViewWidth(self, width, bDpiAware): ...
    def GetItemRowAndColIndex(self, iItem): ...
    def IsLastInRow(self, iItem): ...
    def GetUpItem(self, iItem): ...
    def GetDownItem(self, iItem): ...
    def GetTotalHeight(self): ...
    def Item2Position(self, iItem): ...
    def Position2Item(self, position): ...
    def GetScrollLineSize(self): ...
    def GetMarginSize(self): ...
    def SetScale(self, scale): ...
    def GetCountInRow(self): ...
    def GetItemLineHeight(self): ...
    def GetItemWidth(self): ...

class SListBox(SPanel):
    def GetCount(self): ...
    def GetCurSel(self): ...
    def SetCurSel(self, nIndex, bNotifyChange): ...
    def GetTopIndex(self): ...
    def SetTopIndex(self, nIndex): ...
    def GetItemHeight(self): ...
    def SetItemHeight(self, nItemHeight): ...
    def GetItemData(self, nIndex): ...
    def SetItemData(self, nIndex, lParam): ...
    def GetIText(self, nIndex, bRawText, str): ...
    def DeleteAll(self): ...
    def DeleteString(self, nIndex): ...
    def AddString(self, lpszItem, nImage, lParam): ...
    def InsertString(self, nIndex, lpszItem, nImage, lParam): ...
    def EnsureVisible(self, nIndex): ...
    def FindString(self, iFindAfter, pszText): ...

class SComboBase(SCtrl):
    def GetCurSel(self): ...
    def GetCount(self): ...
    def SetCurSel(self, iSel): ...
    def GetItemText(self, iItem, bRawText=False) -> str: ...
    def FindString(self, pszFind, nAfter, bPartMatch): ...
    def DropDown(self): ...
    def CloseUp(self): ...
    def IsDropdown(self): ...
    def SetDropdown(self, bDropdown): ...

class SComboBox(SComboBase):
    def GetItemData(self, iItem): ...
    def SetItemData(self, iItem, lParam): ...
    def InsertItem(self, iPos, pszText, iIcon, lParam): ...
    def DeleteString(self, iPos): ...
    def ResetContent(self): ...
    def GetIListBox(self) -> SListBox: ...

class SDateTimePicker(SCtrl):
    def SetTime(self, wYear, wMonth, wDay, wHour, wMinute, wSecond): ...
    def GetTime(self): ...
    def CloseUp(self): ...
    def DropDown(self): ...
    def Clear(self): ...

class STreeCtrl(SCtrl):
    def InsertItem(self, lpszItem, nImage, nSelectedImage, lParam, hParent, hInsertAfter): ...
    def RemoveItem(self, hItem): ...
    def RemoveAllItems(self): ...
    def GetRootItem(self): ...
    def GetNextSiblingItem(self, hItem): ...
    def GetPrevSiblingItem(self, hItem): ...
    def GetChildItem(self, hItem, bFirst): ...
    def GetParentItem(self, hItem): ...
    def GetSelectedItem(self): ...
    def GetNextItem(self, hItem): ...
    def SelectItem(self, hItem, bEnsureVisible): ...
    def GetItemText(self, hItem): ...
    def SetItemText(self, hItem, lpszItem): ...
    def GetItemImage(self, hItem, nImage, nSelectedImage): ...
    def SetItemImage(self, hItem, nImage, nSelectedImage): ...
    def GetItemData(self, hItem): ...
    def SetItemData(self, hItem, lParam): ...
    def ItemHasChildren(self, hItem): ...
    def GetCheckState(self, hItem): ...
    def SetCheckState(self, hItem, bCheck): ...
    def Expand(self, hItem, nCode): ...
    def EnsureVisible(self, hItem): ...

class SHotKeyCtrl(SCtrl):
    def SetRule(self, wInvalidComp, wModifier): ...
    def SetHotKey(self, wKey, wModifiers): ...
    def GetHotKey(self): ...

class SRichEdit(SCtrl):
    def SaveRtf(self, pszFileName): ...
    def LoadRtf(self, pszFileName): ...
    def SetSel(self, nStartChar, nEndChar, bNoScroll): ...
    def ReplaceSel(self, pszText, bCanUndo): ...
    def GetWordWrap(self): ...
    def SetWordWrap(self, fWordWrap): ...
    def GetReadOnly(self): ...
    def SetReadOnly(self, bReadOnly): ...
    def GetLimitText(self): ...
    def SetLimitText(self, nLength): ...
    def GetDefaultAlign(self): ...
    def SetDefaultAlign(self, wNewAlign): ...
    def GetRichTextFlag(self): ...
    def SetRichTextFlag(self, fRich): ...
    def GetDefaultLeftIndent(self): ...
    def SetDefaultLeftIndent(self, lNewIndent): ...
    def SetSaveSelection(self, fSaveSelection): ...
    def SetDefaultTextColor(self, cr): ...

class STabPage(SCtrl):
    def GetTitle(self) -> str: ...
    def SetTitle(self, lpszTitle): ...
    def GetIconIndex(self) -> int: ...
    def SetIconIndex(self, iIcon): ...

class STabCtrl(SCtrl):
    def GetCurSel(self): ...
    def SetCurSel(self, nIndex): ...
    def SetItemTitle(self, nIndex, lpszTitle): ...
    def GetItemTitle(self, nIndex) -> str: ...
    def InsertItem(self, lpContent, iInsert): ...
    def GetItemCount(self): ...
    def GetPage(self, nIndex) -> STabPage: ...
    def RemoveItem(self, nIndex, iSelPage=False): ...
    def RemoveAllItems(self): ...
    def GetPageIndex(self, pszName, bTitle): ...

class SSpinButtonCtrl(SCtrl):
    def SetValue(self, nValue): ...
    def SetRange(self, nMin, nMax): ...
    def SetStep(self, nStep): ...
    def GetValue(self): ...
    def GetBuddy(self) -> SWindow: ...

class SSwitch(SCtrl):
    def IsOpen(self): ...
    def SetOpen(self, bOpen, bAnimation=True, bNotify=True): ...

class SChatEdit(SCtrl):
    def AppendFormatText(self, strMsg, bNewLine=True, bCanUndo=True): ...
    def GetFormatText(self) -> str: ...

class SToolbox(SCtrl): ...

class SCaptureButton(SCtrl): ...
